<template>
  <div class="home">
    <div class="anchor-row">
      <Row type="flex"
           justify="space-around"
           class="code-row-bg">
        <Col span="5">
        <Card>
          <div style="text-align:center"
               class="card-box">
            <span class="placeholder"></span>
            <img src="../../assets/img/pic-live.png">
            <span class="card-name">
              <Anchor :affix="false"
                      v-if="showAnchor">
                <AnchorLink href="#interaction"
                            title="教学直播交互" />
              </Anchor>
            </span>
          </div>
        </Card>
        </Col>
        <Col span="5">
        <Card>
          <div style="text-align:center"
               class="card-box">
            <span class="placeholder"></span>
            <img src="../../assets/img/pic-case.png">
            <span class="card-name">
              <Anchor :affix="false"
                      v-if="showAnchor">
                <AnchorLink href="#case-training"
                            title="案例联席研练" />
              </Anchor>
            </span>
          </div>
        </Card>
        </Col>
        <Col span="5"
             v-if="hasGetInfo">
        <Card>
          <div style="text-align:center"
               class="card-box">
            <span class="placeholder"></span>
            <img src="../../assets/img/pic-teach.png">
            <span class="card-name">
              <span class="card-name-item"
                    @click="goEvaluation">教学评价</span>
            </span>
          </div>
        </Card>
        </Col>
        <Col span="5">
        <Card>
          <div style="text-align:center"
               class="card-box">
            <span class="placeholder"></span>
            <img src="../../assets/img/pic-video.png">
            <span class="card-name">
              <Anchor :affix="false"
                      v-if="showAnchor">
                <AnchorLink href="#dibbling"
                            title="资源点播" />
              </Anchor>
            </span>
          </div>
        </Card>
        </Col>
        <!-- <Col span="4">
            <Card>
              <div style="text-align:center" class="card-box">
                <span class="placeholder"></span>
                <img src="../../assets/img/home5.png">
                <span class="card-name">
                  <span class="card-name-item">学生讨论</span>
                </span>
              </div>
            </Card>
          </Col> -->
      </Row>
    </div>
    <!--anchor row-->
    <div id="interaction"
         class="interaction">
      <div class="header">
        <div class="title">
          <img src="../../assets/img/title-live-left.png">
          <span>教学直播交互</span><img src="../../assets/img/title-live-right.png">
        </div>
      </div>
      <div class="desc">
        <Row type="flex"
             justify="space-between"
             class="code-row-bg">
          <Col span="6">
          <scroll>
            <ul class="wrap">
              <li class="item">
                <div class="avatar-wrap">
                  <img :src="liveData.coursesAndTeachersList.photo">
                </div>
                <div class="introduction">
                  <h3>
                    <span>主讲：</span>
                    <strong>{{liveData.coursesAndTeachersList.name}}</strong>
                  </h3>
                  <p>
                    <span>简介：</span>
                    <span>{{liveData.coursesAndTeachersList.introduce}}</span>
                  </p>
                </div>
              </li>
              <li class="item"
                  v-if="liveData.assistantTeacherList.length>0"
                  v-for="(item,index) in liveData.assistantTeacherList">
                <div class="avatar-wrap">
                  <img :src="item.photo">
                </div>
                <div class="introduction">
                  <h3>
                    <span>助教：</span>
                    <strong>{{item.assistantName}}</strong>
                  </h3>
                  <p>
                    <span>简介：</span>
                    <span>{{item.assistantIntroduce}}</span>
                  </p>
                </div>
              </li>
            </ul>
          </scroll>
          </Col>
          <Col span="11"
               class="live-wrap">
          <div class="live-title">
            <div class="live-title-name">
              <span>{{liveData.coursesAndTeachersList.courseName}}</span>
              <strong>NEW</strong>
            </div>
            <div class="live-title-time"><img src="../../assets/img/time.png">
              <span>{{liveData.coursesAndTeachersList.courseStartTime}}</span>
            </div>
          </div>
          <video src="http://vjs.zencdn.net/v/oceans.mp4"
                 poster="../../assets/img/live-poster.jpg"></video>
          <div class="mask">
            <div class="status">
              <span class="placeholder"></span>
              <img src="../../assets/img/live.gif"
                   v-if="liveData.coursesAndTeachersList.courseStatus=='1'">
              <span v-if="liveData.coursesAndTeachersList.courseStatus=='1'">正在上课</span>
              <span v-if="liveData.coursesAndTeachersList.courseStatus=='2'">课程已结束</span>
              <span v-if="liveData.coursesAndTeachersList.courseStatus=='0'">课程未开始</span>
            </div>
            <div class="btn-wrap">
              <img @click="goLive(0)"
                   src="../../assets/img/button-play.png">
            </div>
          </div>
          </Col>
          <Col span="6">
          <div class="chart chart1">
            <div class="chart-title">访问来源统计</div>
            <div id="chart1"></div>
          </div>
          <div class="chart chart2">
            <div class="chart-title">访问来源</div>
            <div id="chart2"></div>
          </div>
          </Col>
        </Row>
      </div>
    </div>
    <div class="vocabulary">
      <Row type="flex"
           justify="space-between"
           class="code-row-bg">
        <Col span="12">
        <div class="title"><img src="../../assets/img/pic-highword.png">近三分钟高频词汇汇总：</div>
        <div class="word-wrap">
          <scroll>
            <ul class="content">
              <li :style="{ color: activeColor(), fontSize: fontSize() + 'px',top:top()+'px'}">灯光</li>
              <li :style="{ color: activeColor(), fontSize: fontSize() + 'px',top:top()+'px'}">声音</li>
              <li :style="{ color: activeColor(), fontSize: fontSize() + 'px',top:top()+'px'}">太快</li>
              <li :style="{ color: activeColor(), fontSize: fontSize() + 'px',top:top()+'px'}">问题</li>
              <li :style="{ color: activeColor(), fontSize: fontSize() + 'px',top:top()+'px'}">速度</li>
              <li :style="{ color: activeColor(), fontSize: fontSize() + 'px',top:top()+'px'}">问题</li>
              <li :style="{ color: activeColor(), fontSize: fontSize() + 'px',top:top()+'px'}">速度</li>
            </ul>
          </scroll>
        </div>
        </Col>
        <Col span="12">
        <div class="title"><img src="../../assets/img/pic-highword.png">总计高频词汇汇总：</div>
        <div class="word-wrap">
          <scroll>
            <ul class="content">
              <li :style="{ color: activeColor(), fontSize: fontSize() + 'px',top:top()+'px'}">灯光</li>
              <li :style="{ color: activeColor(), fontSize: fontSize() + 'px',top:top()+'px'}">声音</li>
              <li :style="{ color: activeColor(), fontSize: fontSize() + 'px',top:top()+'px'}">太快</li>
              <li :style="{ color: activeColor(), fontSize: fontSize() + 'px',top:top()+'px'}">问题</li>
              <li :style="{ color: activeColor(), fontSize: fontSize() + 'px',top:top()+'px'}">速度</li>
              <li :style="{ color: activeColor(), fontSize: fontSize() + 'px',top:top()+'px'}">问题</li>
              <li :style="{ color: activeColor(), fontSize: fontSize() + 'px',top:top()+'px'}">速度</li>
            </ul>
          </scroll>
        </div>
        </Col>
      </Row>
    </div>
    <div id="case-training"
         class="interaction">
      <div class="header">
        <div class="title">
          <img src="../../assets/img/title-prac-left.png">
          <span>案例联席研练</span><img src="../../assets/img/title-prac-right.png">
        </div>
      </div>
      <div class="desc">
        <Row type="flex"
             justify="space-between"
             class="code-row-bg">
          <Col span="6">
          <scroll>
            <ul class="wrap">
              <li class="item">
                <div class="avatar-wrap">
                  <img :src="caseData.coursesAndTeachersList.photo">
                </div>
                <div class="introduction">
                  <h3>
                    <span>主讲：</span>
                    <strong>{{caseData.coursesAndTeachersList.name}}</strong>
                  </h3>
                  <p>
                    <span>简介：</span>
                    <span>{{caseData.coursesAndTeachersList.introduce}}</span>
                  </p>
                </div>
              </li>
              <li class="item"
                  v-if="caseData.assistantTeacherList.length>0"
                  v-for="(item,index) in caseData.assistantTeacherList">
                <div class="avatar-wrap">
                  <img :src="item.photo">
                </div>
                <div class="introduction">
                  <h3>
                    <span>助教：</span>
                    <strong>{{item.assistantName}}</strong>
                  </h3>
                  <p>
                    <span>简介：</span>
                    <span>{{item.assistantIntroduce}}</span>
                  </p>
                </div>
              </li>
            </ul>
          </scroll>
          </Col>
          <Col span="11"
               class="live-wrap">
          <div class="live-title">
            <div class="live-title-name">
              <span>{{caseData.coursesAndTeachersList.courseName}}</span>
              <strong>NEW</strong>
            </div>
            <div class="live-title-time"><img src="../../assets/img/time.png">
              <span>{{caseData.coursesAndTeachersList.courseStartTime}}</span>
            </div>
          </div>
          <video src="http://vjs.zencdn.net/v/oceans.mp4"
                 poster="../../assets/img/live.jpg"></video>
          <div class="mask">
            <div class="status">
              <span class="placeholder"></span>
              <img src="../../assets/img/live.gif"
                   v-if="caseData.coursesAndTeachersList.courseStatus=='1'">
              <span v-if="caseData.coursesAndTeachersList.courseStatus=='1'">正在上课</span>
              <span v-if="caseData.coursesAndTeachersList.courseStatus=='2'">课程已结束</span>
              <span v-if="caseData.coursesAndTeachersList.courseStatus=='0'">课程未开始</span>
            </div>
            <div class="btn-wrap">
              <img @click="goLive(1)"
                   src="../../assets/img/button-play.png">
            </div>
          </div>
          </Col>
          <Col span="6">
          <div class="chart chart3">
            <div class="chart-title">访问来源统计</div>
            <div id="chart3"></div>
          </div>
          <div class="chart chart4">
            <div class="chart-title">访问来源统计</div>
            <div id="chart4"></div>
          </div>
          </Col>
        </Row>
      </div>
    </div>
    <div id="dibbling"
         class="dibbling">
      <div class="header">
        <img src="../../assets/img/title-video-left.png">
        <span>资源点播</span><img src="../../assets/img/title-video-right.png">
      </div>
      <div class="content">
        <ul class="wrap clearfix">
          <li class="item"
              v-for="item in dibbling">
            <div class="video">
              <video src="http://vjs.zencdn.net/v/oceans.mp4"
                     poster="../../assets/img/live-poster.jpg"></video>
              <div class="mask">
                <img src="../../assets/img/button-play.png"
                     @click="goReplay(item)">
              </div>
            </div>
            <div class="videoinfo">
              <div class="line clearfix">
                <div class="name">{{item.courseName}}</div>
              </div>
              <div class="line clearfix">
                <div class="teacher">讲师：
                  <span>{{item.name}}</span>
                </div>
                <div class="type">类型：
                  <span>{{item.courseType==1?'案例联席':'普通教学'}}</span>
                </div>
              </div>
              <div class="line clearfix">
                <div class="time"><img src="../../assets/img/time.png">{{item.courseStartTime}}</div>
                <div class="click-times">点击次数：
                  <span>{{item.playTimes}}</span>次</div>
              </div>
            </div>
          </li>
        </ul>
      </div>
      <div class="footer">
        <a @click="goResources">更多资源点这里
          <span>>></span>
        </a>
      </div>
    </div>
  </div>
</template>
<script>
import Scroll from '@/components/scroll'
import { mapState } from 'vuex'
import { queryTeachingResultsManage } from '@/api/management.js'
import { getCourseInfoByCourseStatus, updatePlayTimes, addStudentNotes } from '@/api/data.js'

export default {
  data () {
    return {
      showAnchor: false,
      pageSize: 6,
      pageIndex: 1,
      dibbling: [],
      liveData: {
        coursesAndTeachersList: {
          courseName: '',
          courseStartTime: '',
          name: '',
          introduce: '',
          courseStatus: "",
          photo: "../../assets/img/avatar.png"
        },
        assistantTeacherList: []
      },
      caseData: {
        coursesAndTeachersList: {
          courseName: '',
          courseStartTime: '',
          name: '',
          introduce: '',
          courseStatus: ""
        },
        assistantTeacherList: []
      },
    }
  },
  computed: {
    ...mapState({
      hasGetInfo: state => state.user.hasGetInfo,
      userId: state => state.user.userId,
      roleId: state => state.user.roleId
    })
  },
  mounted () {
    this.initChart()
    this.getList()
    this.showAnchor = true
  },
  created () {
    this.getCourseInfoByCourseStatus()
  },
  methods: {
    // 初始化图表
    initChart () {
      var myChart1 = this.$echarts.init(document.getElementById('chart1'));
      var data1 = [
        { value: 400, name: '搜索引擎' },
        { value: 335, name: '直接访问' },
        { value: 310, name: '邮件营销' },
        { value: 274, name: '联盟广告' },
        { value: 235, name: '视频广告' }
      ];
      var option1 = {
        title: {
          text: data1[0].name,
          subtext: data1[0].value + '人',
          top: '33%',
          left: '25%',
          textStyle: {
            fontSize: '14',
            color: '#9795b0'
          },
          subtextStyle: {
            fontWeight: 'bold',
            fontSize: '16',
            color: '#575777'
          }
        },
        legend: {
          show: true,
          top: 'middle',
          right: '20',
          orient: 'vertical',
          textStyle: {
            color: '#8A8A97'
          },
          data: [
            {
              name: '搜索引擎',
              icon: 'circle'
            },
            {
              name: '直接访问',
              icon: 'circle'
            },
            {
              name: '邮件营销',
              icon: 'circle'
            },
            {
              name: '联盟广告',
              icon: 'circle'
            },
            {
              name: '视频广告',
              icon: 'circle'
            }
          ]
        },
        color: ["#7da1fc", "#76d2fd", "#ddb5fd", "#fa9ca3", "#fbcea2", "#8ee8de"],
        series: [
          {
            name: '访问来源',
            type: 'pie',
            radius: ['65%', '85%'],
            center: ['35%', '50%'],
            label: {
              show: false,
              position: 'center'
            },
            data: data1
          }
        ]
      }
      myChart1.setOption(option1, true);
      myChart1.on('mouseover', function (e) {
        option1.title.text = e.data.name;
        option1.title.subtext = e.data.value + '人';
        myChart1.setOption(option1, true);
      })
      window.addEventListener("resize", () => { myChart1.resize(); });

      var myChart2 = this.$echarts.init(document.getElementById('chart2'));
      var option2 = {
        color: ["#7da1fc", "#76d2fd", "#ddb5fd", "#fa9ca3", "#fbcea2", "#8ee8de"],
        series: [
          {
            name: '访问来源',
            type: 'pie',
            radius: ['62%', '82%'],
            center: ['50%', '50%'],
            label: {
              color: '#8A8A97'
            },
            data: data1
          }
        ]
      }
      myChart2.setOption(option2, true);
      window.addEventListener("resize", () => { myChart2.resize(); });

      var myChart3 = this.$echarts.init(document.getElementById('chart3'));
      var option3 = {
        title: {
          text: data1[0].name,
          subtext: data1[0].value + '人',
          top: '33%',
          left: '25%',
          textStyle: {
            fontSize: '14',
            color: '#9795b0'
          },
          subtextStyle: {
            fontWeight: 'bold',
            fontSize: '16',
            color: '#575777'
          }
        },
        legend: {
          show: true,
          top: 'middle',
          right: '20',
          orient: 'vertical',
          textStyle: {
            color: '#8A8A97'
          },
          data: [
            {
              name: '搜索引擎',
              icon: 'circle'
            },
            {
              name: '直接访问',
              icon: 'circle'
            },
            {
              name: '邮件营销',
              icon: 'circle'
            },
            {
              name: '联盟广告',
              icon: 'circle'
            },
            {
              name: '视频广告',
              icon: 'circle'
            }
          ]
        },
        color: ["#7da1fc", "#76d2fd", "#ddb5fd", "#fa9ca3", "#fbcea2", "#8ee8de"],
        series: [
          {
            name: '访问来源',
            type: 'pie',
            radius: ['65%', '85%'],
            center: ['35%', '50%'],
            label: {
              show: false,
              position: 'center'
            },
            data: data1
          }
        ]
      }
      myChart3.setOption(option3, true);
      myChart3.on('mouseover', function (e) {
        option3.title.text = e.data.name;
        option3.title.subtext = e.data.value + '人';
        myChart3.setOption(option3, true);
      })
      window.addEventListener("resize", () => { myChart3.resize(); });

      var myChart4 = this.$echarts.init(document.getElementById('chart4'))
      var option4 = {
        color: ["#7da1fc", "#76d2fd", "#ddb5fd", "#fa9ca3", "#fbcea2", "#8ee8de"],
        series: [
          {
            name: '访问来源',
            type: 'pie',
            radius: ['62%', '82%'],
            center: ['50%', '50%'],
            label: {
              color: '#8A8A97'
            },
            data: data1
          }
        ]
      }
      myChart4.setOption(option4, true);
      window.addEventListener("resize", () => { myChart4.resize(); });
    },
    // 高频词汇动态文字颜色
    activeColor () {
      var color = [
        '#2d8cf0',
        '#2db7f5',
        '#19be6b',
        '#ff9900',
        '#ed4014',
        '#17233d'
      ]
      var i = Math.floor(Math.random() * 6)
      return color[i]
    },
    // 高频词汇动态文字大小
    fontSize () {
      return 16 + Math.random() * 10
    },
    // 高频词汇动态文字位置
    top () {
      return Math.random() * 25
    },
    // 跳转更多资源页面
    goResources () {
      this.$router.push({
        name: 'resources'
      })
    },
    // 跳转教学评价页面
    goEvaluation () {
      this.$router.push({
        name: 'evaluation'
      })
    },
    // 跳转直播页面
    goLive (index) {
      // index==0普通直播，index==1案例联席直播
      if (index == 0) {
        let routeData = this.$router.resolve({
          name: 'live'
          // query: params,
        })
        if (this.roleId == 3) {
          let data = {
            courseId: this.liveData.coursesAndTeachersList.courseId,
            userId: this.userId
          }
          addStudentNotes(data).then(res => {
            console.log(res.data)
          })
        }
        sessionStorage.setItem("liveData", JSON.stringify(this.liveData.coursesAndTeachersList));
        window.open(routeData.href, '_blank')
      } else {
        let routeData = this.$router.resolve({
          name: 'live'
          // query: params,
        })
        if (this.roleId == 3) {
          let data = {
            courseId: this.caseData.coursesAndTeachersList.courseId,
            userId: this.userId
          }
          addStudentNotes(data).then(res => {
            console.log(res.data)
          })
        }
        sessionStorage.setItem("caseData", JSON.stringify(this.caseData.coursesAndTeachersList));
        window.open(routeData.href, '_blank')
      }

    },
    // 点播
    goReplay (item) {
      let routeData = this.$router.resolve({
        name: 'replay',
        // query: params,
        params: { item: item }
      })
      sessionStorage.setItem('replayData', item.videoFileName)
      window.open(routeData.href, '_blank')
      updatePlayTimes(item.videoId).then(res => {
        if (res.data == 'success') {
          this.getList()
        }
      })

    },
    getList () {
      const params = {
        pageNum: this.pageIndex,
        pageSize: this.pageSize,
        courseType: '',
        videoName: '',
        putinStatus: '',
        startDate: '',
        endDate: ''
      }
      queryTeachingResultsManage(params).then(({ data }) => {
        if (data.rows.length > 0) {
          this.dibbling = data.rows
        } else {
          this.dibbling = []
        }
      })
    },
    getCourseInfoByCourseStatus () {
      this.getCourseInfoByCourseStatusLive()
      this.getCourseInfoByCourseStatusCase()
    },
    getCourseInfoByCourseStatusLive () {
      getCourseInfoByCourseStatus(0).then((res) => {
        if (res.data) {
          let data = res.data
          if (data.coursesAndTeachersList.courseStatus == 1) {
            eventBus.$emit('setTeacherTip', data.coursesAndTeachersList.notice)
          }
          data.coursesAndTeachersList.photo = process.env.API_ROOT.replace('wisdom-classroom/', '') +
            'images/photo/' + res.data.coursesAndTeachersList.photo
          if (data.assistantTeacherList.length > 0) {
            data.assistantTeacherList.map(item => {
              item.photo = process.env.API_ROOT.replace('wisdom-classroom/', '') +
                'images/photo/' + item.photo
            })
          }
          this.liveData = data
        }
      })
    },
    getCourseInfoByCourseStatusCase () {
      getCourseInfoByCourseStatus(1).then((res) => {
        if (res.data) {
          let data = res.data
          if (data.coursesAndTeachersList.courseStatus == 1) {
            eventBus.$emit('setTeacherTip', data.coursesAndTeachersList.notice)
          }
          data.coursesAndTeachersList.photo = process.env.API_ROOT.replace('wisdom-classroom/', '') +
            'images/photo/' + res.data.coursesAndTeachersList.photo
          if (data.assistantTeacherList && data.assistantTeacherList.length > 0) {
            data.assistantTeacherList.map(item => {
              item.photo = process.env.API_ROOT.replace('wisdom-classroom/', '') +
                'images/photo/' + item.photo
            })
          }
          this.caseData = data
        }
      })
    }
  },
  components: {
    Scroll
  },
  watch: {
    $route (newName, oldName) {
      if (newName.name === 'home') {
        this.showAnchor = true
      } else {
        this.showAnchor = false
      }
    }
  }
}
</script>

<style lang="scss">
.home {
  #case-training {
    padding: 40px 0;
    background: #e8ebf2;
  }
  .anchor-row {
    padding: 20px 0 40px;
    margin-bottom: 60px;
    background: #e8ebf2;
    .code-row-bg {
      width: 88%;
      margin: 0 auto;
      .ivu-col {
        border-radius: 20px;
        overflow: hidden;
        border: 1px solid #eee;
        box-shadow: 0 0 10px #eee;
        transition: all 0.3s;
        &:hover {
          border-color: #15a4fa;
          box-shadow: 0 0 10px #15a4fa;
        }
      }
    }
  }
  .code-row-bg {
    .ivu-card {
      height: 120px;
      .ivu-card-body {
        height: 100%;
      }
      .card-box {
        height: 100%;
        font-size: 0;
        img {
          width: 3.4vw;
          height: 3.4vw;
          vertical-align: middle;
          margin-right: 1vw;
        }
        .card-name {
          vertical-align: middle;
          font-size: 0;
          font-family: 'Arial Normal', 'Arial';
          font-weight: 400;
          font-style: normal;
          color: #333333;
          display: inline-block;
          .card-name-item {
            font-size: 16px;
            color: #515a6e;
            cursor: pointer;
          }
          & > div {
            display: inline-block;
          }
          .ivu-anchor-ink {
            display: none;
          }
          .ivu-anchor-link {
            padding: 0;
            font-size: 16px;
          }
          .ivu-anchor-wrapper {
            display: inline-block;
          }
        }
      }
    }
  }
  .interaction {
    margin-bottom: 40px;
    font-size: 0;
    .header {
      text-align: center;
      font-family: 'Arial Normal', 'Arial';
      font-style: normal;
      color: #333333;

      .title {
        margin-bottom: 38px;
        font-size: 20px;
        font-weight: bold;
        color: #484d69;
        span {
          margin: 0 25px;
          vertical-align: middle;
        }
        img {
          vertical-align: top;
        }
      }
      .subtitle {
        font-size: 16px;
        height: 40px;
        line-height: 40px;
      }
    }
    .desc {
      width: 90vw;
      height: 370px;
      margin: 0 auto;
      .code-row-bg {
        .ivu-col {
          overflow: hidden;
          height: 370px;
          .wrap {
            padding: 5px;
            .item {
              display: flex;
              padding: 10px;
              margin-bottom: 20px;
              background: #f6f9ff;
              border: 1px solid #e8ebf2;
              border-radius: 10px;
              box-shadow: 2px 3px 5px #ccc;
              .avatar-wrap {
                display: flex;
                padding: 0 15px 0 5px;
                margin-right: 10px;
                align-items: center;
                border-right: 1px solid #e8ebf2;
                img {
                  width: 70px;
                  height: 70px;
                  border-radius: 100%;
                }
              }
              .introduction {
                padding: 0 5px;
                font-size: 14px;
                color: #7f7f8d;
                h3 {
                  margin-bottom: 6px;
                  strong {
                    font-weight: normal;
                    font-size: 16px;
                    color: #2fa2fc;
                  }
                }
                p {
                  height: 66px;
                  line-height: 22px;
                  overflow: hidden;
                }
              }
            }
          }
          .chart {
            width: 100%;
            height: 50%;
            .chart-title {
              position: relative;
              height: 40px;
              line-height: 40px;
              padding-left: 20px;
              font-size: 16px;
              color: #5f678d;
              &::after {
                display: block;
                content: '';
                position: absolute;
                top: 10px;
                left: 0;
                width: 8px;
                height: 20px;
                background: #a9b0cc;
              }
            }
            #chart1,
            #chart2,
            #chart3,
            #chart4 {
              height: 145px;
            }
          }
          &.live-wrap {
            position: relative;
            .live-title {
              display: flex;
              width: 100%;
              height: 40px;
              margin-bottom: 20px;
              .live-title-name {
                flex: 7;
                line-height: 40px;
                font-size: 18px;
                color: #484d69;
                span {
                  display: inline-block;
                  vertical-align: middle;
                  max-width: 80%;
                  overflow: hidden;
                  text-overflow: ellipsis;
                  white-space: nowrap;
                }
                strong {
                  padding: 2px 10px;
                  margin-left: 10px;
                  vertical-align: middle;
                  font-weight: normal;
                  font-size: 14px;
                  color: #fff;
                  background: #f98121;
                  border-radius: 30px;
                }
              }
              .live-title-time {
                flex: 4;
                padding-right: 10px;
                line-height: 40px;
                text-align: right;
                font-size: 14px;
                color: #8a92a5;
                img {
                  margin-right: 5px;
                  vertical-align: middle;
                }
                span {
                  vertical-align: middle;
                }
              }
            }
            video {
              width: 100%;
              height: 310px;
              border-radius: 10px;
            }
            .mask {
              position: absolute;
              left: 0;
              bottom: 0;
              width: 100%;
              height: 310px;
              background: rgba(0, 0, 0, 0.1);
              border-radius: 10px;
              .status {
                position: absolute;
                top: 15px;
                right: 15px;
                text-align: center;
                color: #fff;
                font-size: 16px;
                background: rgba(0, 0, 0, 0.5);
                padding: 0 20px;
                margin-bottom: 20px;
                height: 40px;
                line-height: 40px;
                border-radius: 20px;
                img {
                  width: 20px;
                  height: 20px;
                  vertical-align: middle;
                }
                span {
                  vertical-align: middle;
                }
              }
              .btn-wrap {
                position: absolute;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
                img {
                  cursor: pointer;
                  width: 60px;
                  height: 60px;
                  transition: all 0.3s;
                  &:hover {
                    width: 80px;
                    height: 80px;
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  .vocabulary {
    width: 90vw;
    margin: 0 auto 40px;
    box-sizing: border-box;
    .code-row-bg {
      height: 100%;
      margin: 0;
      .ivu-col {
        height: 100%;
        padding: 0 10px;
        .title {
          padding-left: 30px;
          font-size: 14px;
          height: 30px;
          line-height: 30px;
          border: 1px solid #e8ebf2;
          border-radius: 10px 10px 0 0;
          background: #fbf7ff;
          img {
            vertical-align: middle;
            margin-right: 12px;
          }
        }
        .word-wrap {
          height: 90px;
          overflow-y: hidden;
          border: 1px solid #e8ebf2;
          border-top: none;
          border-radius: 0 0 10px 10px;
          box-shadow: 0 4px 8px 0 rgba(7, 17, 27, 0.1);
          .content {
            font-size: 0;
            li {
              text-align: center;
              position: relative;
              display: inline-block;
              width: 20%;
              height: 60px;
            }
          }
        }
      }
    }
  }
  .dibbling {
    .header {
      margin-bottom: 38px;
      text-align: center;
      font-size: 20px;
      font-weight: bold;
      color: #484d69;
      span {
        margin: 0 25px;
        vertical-align: middle;
      }
      img {
        vertical-align: top;
      }
    }
    .content {
      width: 90vw;
      margin: 0 auto;
      .wrap {
        width: 100%;
        .item {
          float: left;
          width: calc(100% / 3);
          padding: 0 10px 20px;
          .video {
            width: 100%;
            height: 180px;
            position: relative;
            border-radius: 10px;
            overflow: hidden;
            video {
              width: 100%;
              height: 100%;
            }
            .mask {
              position: absolute;
              left: 0;
              top: 0;
              width: 100%;
              height: 100%;
              background: rgba(0, 0, 0, 0.1);
              font-size: 0;
              img {
                width: 60px;
                height: 60px;
                position: absolute;
                left: 50%;
                top: 50%;
                transform: translateX(-50%) translateY(-50%);
                transition: all 0.3s;
                cursor: pointer;
                &:hover {
                  width: 70px;
                  height: 70px;
                }
              }
            }
          }
          .videoinfo {
            padding-top: 10px;
            .line {
              .name {
                float: left;
                font-size: 16px;
                color: #484d69;
              }
              .teacher {
                float: left;
                font-size: 12px;
                color: #8a92a5;
                line-height: 20px;
                span {
                  font-size: 14px;
                  color: #484d69;
                }
              }
              .type {
                float: right;
                font-size: 12px;
                line-height: 20px;
                color: #8a92a5;
                span {
                  font-size: 14px;
                  color: #484d69;
                }
              }
              .time {
                float: right;
                font-size: 12px;
                line-height: 20px;
                color: #8a92a5;
                img {
                  width: 13px;
                  vertical-align: -2px;
                  margin-right: 5px;
                }
              }
              .click-times {
                float: left;
                font-size: 12px;
                line-height: 20px;
                color: #8a92a5;
                span {
                  font-size: 14px;
                  color: #484d69;
                }
              }
            }
          }
        }
      }
    }
    .footer {
      text-align: right;
      padding: 20px 80px;
      font-size: 14px;
      &:hover {
        text-decoration: underline;
      }
    }
  }
}
</style>



